﻿/**
 * Reboulder - Partial Boulder Dash clone
 * Jesús Sagra, 2014
 * 
 * IntroScreen class: welcome screen before the game
 * 
 * Version    Date     Changes
 * -----------------------------------------------------
 *  0.01   08-dic-2014  Load image. Start/Exit. Blinking text.
 */

using System;

class IntroScreen
{
    protected Font font18;

    public IntroScreen()
    {
        font18 = new Font("data/Joystix.ttf", 18);
    }


    public void Run()
    {
        Image background = new Image("data/intro.png");
        byte r, g, b;   //Colour composition
        r = g = b = 255;

        do
        {
            SdlHardware.ClearScreen();
            SdlHardware.DrawHiddenImage(background, 0, 0);
            SdlHardware.WriteHiddenText("INSERT COINS", 
                435, 600, r, g, b, font18);
            r = g = b += 20;    //Change text colours for blicking text
            SdlHardware.ShowHiddenScreen();

            SdlHardware.Pause(40);
        }
        while ( !SdlHardware.KeyPressed(SdlHardware.KEY_SPC) );    
    }
}